$(document).ready(function() {
	$("#frmCreateQuick").validate({
		errorClass		: 'errorMessage',
		errorElement	: 'span',
		onfocusout		: false,
		onkeyup			: false,
		rules: {
			ptitle: {
				required				: true,
				minlength				: 5
			},
			pcategoryid:{
				min						: 1
			},
			pprovince: {
				min						: 1
			},
			pmobile: {
				required				: true
			}
		},
		messages: {	
			ptitle: {
				required				: name_required,
				minlength				: name_minlength
			},
			pcategoryid:{
				min						: cate_required
			},
			pprovince: {
				min						: province_required
			},
			pmobile: {
				required				: mobile_required
			}
		},
		errorPlacement: function(label, element) {
			var id = element.attr('id');	
			if(id == "pcategoryid") {
				label.insertAfter($('.category'));			
			}else if(id == "pprovince") {
				label.insertAfter($('.province'));			
			}else {
				label.insertAfter($('#' + id));			
			}
		}				 
	});
});